from rest_framework import serializers
from apps.common.uploadFile.models import *

class FileSerializer(serializers.ModelSerializer):

    url = serializers.SerializerMethodField()
    def get_url(self, obj):
        return obj.baseImgUrl + obj.fileName

    class Meta:
        model = File
        fields = '__all__'
